{% load static %}
<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <title>Прохождение теста</title>
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="{% static 'main/css/take_tests.css' %}" />
</head>
<body>
    <div class="container mt-5">
        <h1>{{ task.title }}</h1>
        <div class="card p-3 mt-4">
            <p>{{ task.description }}</p>
            
            <div class="text-center my-4">
                {% if task.image %}
                <img src="{{ task.image.url }}" alt="Task image" class="img-fluid">
                {% endif %}
            </div>
            <form method="post" enctype="multipart/form-data">
                {% csrf_token %}
                {{ form.as_p }}
                <button type="submit" class="btn btn-primary">Сохранить ответ</button>
            </form>
        </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
